var $j = jQuery.noConflict();
$j(function() {
	var url = "/MeowcashVisa/html/visa/FrontContinentAction/getAllContentCountries.action";
	$j.post(url, '', addDataTable_Country,'json');
	
	function addDataTable_Country(data,status) {
		
		var allDataObj = data.invdata;
		
		$j("#DataTable_Country").html('');
		var htmlStr = '';
		for(var i = 0; i < allDataObj.length; i++) {
			htmlStr += '<tr><td colspan="8" class="contentTD">' + allDataObj[i].name + '</td></tr>';
			
			if(allDataObj[i].countries.length == 0)
				continue;
			
			htmlStr += '<tr>';
			var columnIndex = 0;
			for(var j = 0; j < allDataObj[i].countries.length; j++) {
				if(columnIndex > 7) {
					htmlStr += '</tr>';
					htmlStr += '<tr>';
					columnIndex = 0;
				}
				htmlStr += '<td class="countryTD"><a target="_blank" href="/MeowcashVisa/html/visa/FrontContinentAction/showContentNew.action?tableName=visacountry&id=' + allDataObj[i].countries[j].id + '" class="countryA">' + allDataObj[i].countries[j].nameCn + '</a></td>';
				
				columnIndex ++;
			}
			
			if(columnIndex > 0 && columnIndex <= 7) {
				htmlStr += '</tr>';
			}
		}
		
		$j("#DataTable_Country").html(htmlStr);
	}
	
	
});